##### APP Macros #####
APPNAME    = slidetst
APPSRCS    = $(APPNAME).c 
APPOBJS    =

##### C7 Macro #####
C7	   = 1

##### APP Library Macros #####
APPLIBS    = libw llibcew slider
APPMOD	   = -AL

##### APP Include Macros #####
APPINCLS   = $(APPNAME).h

##### APP Resource Macros #####
APPRCFILES = $(APPNAME).ico $(APPNAME).rc

##### DEBUG Version Built #####
DEBUG	= 1

##### Build Option Macros #####
!if $(DEBUG)
DDEF	= -DDEBUG
CLOPT	= -Zid -Od
MOPT	= -Zi
LOPT	= /CO /LI /MAP
!else
DDEF	=
CLOPT	= -Os
LOPT	=
!endif

##### Tool Macros #####
ASM	= masm -Mx $(MOPT) $(DDEF) $(DEF)
CC	= cl -nologo -c $(APPMOD) -G2sw -Zp -W3 $(CLOPT) $(DDEF) $(DEF) 
CC2	= cl -nologo -c $(DLLMOD) -G2sw -Zp -W3 $(CLOPT) $(DDEF) $(DEF)
LINK	= link /NOD /NOE $(LOPT)
RC	= rc $(DDEF) $(DEF)
HC	= hc

##### Inference Rules #####
.c.obj:
    $(CC2) $*.c

.asm.obj:
    $(ASM) $*.asm;

.rc.res:
    $(RC) -r $(DEMO) $*.rc

##### Main (default) Target #####
goal: $(APPNAME).exe

##### Dependents For Goal and Command Lines #####
slidetst.obj: slidetst.c
    $(CC) $*.c

$(APPNAME).exe: $(APPSRCS:.c=.obj) slidetst.def $(APPNAME).res
    $(LINK) @<<
    $(APPSRCS:.c=.obj) $(APPOBJS),
    $(APPNAME).exe,
    $(APPNAME).map,
    $(APPLIBS),
    slidetst.def
<<
    $(RC) -T $(APPNAME).res
!if $(DEBUG)
!if !$(C7)
    cvpack -p $(APPNAME).exe
!endif
!endif

##### Dependents #####
$(APPSRCS:.c=.obj): $(APPINCLS)
$(APPNAME).res: $(APPINCLS) $(APPRCFILES)

##### Clean Directory #####
clean:
    -del *.obj
    -del *.res
    -del *.map
    -del *.sym
    -del *.lib
